import * as types from '../types/locale'
import Setting from '@/setting'

const state = {
  localeLang: Setting.localeLang
}
const getters = {
  getLocalLang: state => state.localeLang
}
const mutations = {
  [types.SET_LOCALE_LANG](state, status) {
    state.localeLang = status
  }
}
const actions = {
  setLocalLang({ commit }, status) {
    commit(types.SET_LOCALE_LANG, status)
  }
}
export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}
